Skip to content

Update a service on a cluster.

Request

Requires V2 services config.


Requires node::configure::services permissions

Security
JWTAuthorizer
Path
clusterFQDNstringrequired

Cluster FQDN

serviceIDstringrequired

Service ID

Bodyapplication/jsonrequired

Service

descriptionstring

service description

enabledboolean

whether service is enabled

Example:true
hoststringrequired

destination host name

Example:"192.168.200.62"
indexnumber

sorting index

namestringrequired

service name

Example:"gw-http"
portnumber, [ 1 .. 65536 ]required

destination port

Example:5000
protocolstringrequired

protocol

Enum:"udp""tcp""tftp""ftp""rdp""vnc""ssh"
Example:"tcp"
sourceFromClusterIPboolean

When true and sourceInterface is set, the forwarder binds the outbound socket to the cluster VIP on that interface instead of the active node's interface IP. Has no effect unless sourceInterface is also set. Only meaningful on cluster services; ignored on standalone node services.

Example:true
sourceInterfacestring

NIC name (e.g. ens192) the L4 forwarder uses to source the upstream connection. Valid on its own to control source interface binding; also required for sourceFromClusterIP to take effect.

Example:"ens192"
curl -i -X PUT \
  'https://apidocs.trustgrid.io/_mock/v2/cluster/{clusterFQDN}/config/services/{serviceID}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "gw-http",
    "protocol": "tcp",
    "port": 5000,
    "host": "192.168.200.62",
    "enabled": true,
    "sourceInterface": "ens192",
    "sourceFromClusterIP": true
  }'

Responses

OK

Response
No content